home *** CD-ROM | disk | FTP | other *** search
/ Shocking The Web CD-ROM / SHOCK_CD.ISO / mac / Chapter Tutorials / ch06.Media / TextChanger / textChanger.dir / 00001.ls next >
Encoding:
Text File  |  1996-12-06  |  862 b   |  43 lines

  1. global gPlatform
  2.  
  3. on startMovie
  4.   clearGlobals()
  5.   set thisPage to "e_sabout.htm"
  6.   setShockSpec(thisPage)
  7.   localInit()
  8. end
  9.  
  10. on localInit
  11.   global gFields, showMe, gExitOp
  12.   setStyles()
  13.   initColorLists()
  14.   initHeightPatch()
  15.   set gFields to []
  16.   repeat with i = 1 to 5
  17.     append(gFields, "text" & i)
  18.   end repeat
  19.   resetAllFields()
  20.   set showMe to 0
  21.   set the randomSeed to the ticks
  22.   set gExitOp to " =" && QUOTE & "bold" & QUOTE && "then exit"
  23. end
  24.  
  25. on setShockSpec thisPage
  26.   if the machineType = 256 then
  27.     set gPlatform to "win"
  28.   else
  29.     set gPlatform to "mac"
  30.     if not (the colorDepth = 8) then
  31.       alert("If possible, set your monitor to 256 colors and reload this page.")
  32.       exit
  33.     end if
  34.   end if
  35. end
  36.  
  37. on waitForTicks theTicks
  38.   set startTime to the timer
  39.   repeat while (startTime + theTicks) > the timer
  40.     nothing()
  41.   end repeat
  42. end
  43.